home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 101-125 / scopedisk108 / unshar / unshar.doc < prev    next >
Text File  |  1995-03-19  |  5KB  |  133 lines

  1.  
  2.      UNSHAR V1.2(1)        AMIGA Programmer's Manual         UNSHAR V1.2(1)
  3.  
  4.  
  5.  
  6.      ›1mNAME 
  7.           ›0munshar - extracts files from shar archives 
  8.  
  9.      ›1mSYNOPSIS 
  10.           ›0munshar {-overwrite} {-nosort} file1 file2 ...  
  11.  
  12.      ›1mDESCRIPTION 
  13.           ›0mUnshar is a utility which extracts files from the ubiquitous
  14.           Unix shar  archives.    It has the following advantages over
  15.           existing unshar utilities: 
  16.  
  17.                - Small and fast 
  18.                - Handles many cat and sed formats 
  19.                - Allows extraction of subdirectories 
  20.                - Understands ./file type filenames 
  21.                - Understands file continuation with >> 
  22.                - Sorts file list by Subject: line 
  23.                - Exits cleanly with CTRL-C 
  24.  
  25.           The total code size is slightly under  5K,  for  those  with
  26.           packed C  directories.  It treats quotes and imbedded escape
  27.           sequences intelligently and handles  all  the  cat  and  sed
  28.           formats  I've  ever seen, including sed commands which strip
  29.           off more than one letter.  There  may  be  some  formats  it
  30.           won't handle, but I've yet to find them.  
  31.  
  32.           Invoke  unshar  with  as many archive filenames as you like.
  33.           All the files in each archive will  be  extracted  into  the
  34.           current directory.    If  a file already exists, unshar asks
  35.           you how you want to handle it.  Entering `Y' will  overwrite
  36.           the  existing file with the version in the archive, `N' will
  37.           skip past the file  without  extracting  it,  and  `A'  will
  38.           overwrite  this  file  and  any other existing files without
  39.           prompting you again.  Including the -o flag on  the  command
  40.           line causes files to always be overwritten.  
  41.  
  42.      ›1mOPERATION 
  43.           ›0mUnshar  scans  through each archive specified on the command
  44.           line, looking for lines beginning with `cat' or  `sed'.  All
  45.           other lines  are  ignored.   In particular, `echo' lines are
  46.           not echoed.  This way, you don't  get  a  load  of  messages
  47.           which  are  in  any  case  fairly  meaningless,  because the
  48.           operations they are describing are unsupported.  
  49.  
  50.           When a shar  archive  contains  a  file  for  which  a  full
  51.           pathname  is  given (as in source/file.c for example) unshar
  52.           will create whatever directories are  necessary.    It  also
  53.           strips   off   leading  /'s  and  ./'s,  to  make  filenames
  54.           understandable by AmigaDOS.  
  55.  
  56.           Occasionally, a shar file distribution will contain  a  file
  57.           too  large  to  fit into a single shar archive (archives are
  58.           typically limited to around 60K or so for transmission  over
  59.           Usenet). One method some archivers use to get around this is
  60.           to  split the large file into several smaller parts, and use
  61.           the shell `>>' redirection operator to concatenate the parts
  62.           together while extracting the files.  In order for  this  to
  63.  
  64.  
  65.      Copyright Eddy Carroll 1990      -1-
  66.  
  67.  
  68.      UNSHAR V1.2(1)        AMIGA Programmer's Manual         UNSHAR V1.2(1)
  69.  
  70.  
  71.           work  properly,  it  is important that the archive files are
  72.           extracted in the correct sequence; otherwise, all the pieces
  73.           will get joined together in the wrong order.  
  74.  
  75.           To assist with this, unshar does  a  prescan  over  all  the
  76.           files listed on the command line, and checks each file for a
  77.           "Subject:" line.    If  it  finds  such  a line, it scans it
  78.           looking for any hints as to where  the  file  comes  in  the
  79.           sequence.   Most  shar  files  you  feed  to  unshar will be
  80.           directly from a Usenet sources or binaries group,  and  will
  81.           include  a  volume  and issue reference on the subject line.
  82.           If unshar can't find such an issue reference, it  will  look
  83.           for a Part number and use that instead.  
  84.  
  85.           Unshar  then  extracts the archives starting with the lowest
  86.           numbered file.  This helps to ensure that those  extra-large
  87.           files are  created correctly.  You can tell when such a file
  88.           is being  created,  because  unshar  says  "Extending  file"
  89.           rather than "Unsharing file".  
  90.  
  91.           If  for  some  reason you want the files to be unarchived in
  92.           the order listed on the command line, you  can  specify  the
  93.           `-n' (nosort) switch, and no sorting will take place.  
  94.  
  95.      ›1mDISTRIBUTION 
  96.           ›0mUnshar  may  be  freely distributed, as long as no charge is
  97.           made for doing so.  
  98.  
  99.      ›1mHISTORY 
  100.           ›0mV1.0  First release.  
  101.  
  102.           V1.1  Added support for some more unusual uses of sed.  
  103.                 Increased speed, and reduced size slightly.  
  104.                 Fixed bug that truncated lines longer than 80 chars.  
  105.  
  106.           V1.2  Added support for sorting by Subject: line 
  107.                 Added support for file appending via >> 
  108.                 Fixed small bug in detection of disk write errors 
  109.  
  110.      ›1mAUTHOR 
  111.           ›0mEddy Carroll 
  112.           EMAIL: ecarroll@vax1.tcd.ie 
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.      Copyright Eddy Carroll 1990      -2-
  132.  
  133.